package com.wmx.main.text05.animal;

/**
 * @author:wmx 2025-03-29 14:05
 * 功能:动物的抽象类
 * @param name 名字
 * @param kind 种类
 **/


public abstract class Animal {
    private  String name;
    private  String kind;
    private  int hypnotics;

    public Animal(String name, String kind, int hypnotics) {
        this.name = name;
        this.kind = kind;
        this.hypnotics = hypnotics;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getKind() {
        return kind;
    }

    public void setKind(String kind) {
        this.kind = kind;
    }

    public int getHypnotics() {
        return hypnotics;
    }

    public void setHypnotics(int hypnotics) {
        this.hypnotics = hypnotics;
    }

    @Override
    public String toString() {
        return "Animal{" +
                "name='" + name + '\'' +
                ", kind='" + kind + '\'' +
                ", hypnotics=" + hypnotics +
                '}';
    }


    /**
     * 动作:吃
     */
    public abstract void  eat();
    /**
     * 动作:睡
     */
    public abstract void  sleep();

}
